<?php
include 'db.php';

$stmt = $pdo->prepare("SELECT * FROM tools");
$stmt->execute();
$tools = $stmt->fetchAll(PDO::FETCH_ASSOC);

echo json_encode(['success' => true, 'tools' => $tools]);